﻿@using WebEntities;
@using WebsiteUI.Extensions;

@{
    ViewBag.Title = "行业信息_城市垃圾处理网";
    ViewBag.ClassHead = "head_bg";
}
<div class="main_l">
    <div class="pageTitle">
        <i class="bgPic fl"></i>
        <div class="fl">
            行业信息</div>
    </div>
    <div class="ad_show">
         @Html.Action("ADScroll", "PublicPartialView")
    </div>
    <div class="contentBox">
        <div class="con_bar">
            <span class="fl tit"><a href="/list/index/@ViewBag.EnvHealthID">环境卫生</a></span>
             <span class="subitem">
                <input type="hidden" value="envcata" name="refreshdiv" />
             @{
                 List<WI_NewsCata> envCataList = ViewBag.EnvCataList as List<WI_NewsCata>;
                 int cataCount = 0;
                 foreach (var envCata in envCataList)
                 {
                     <a href="/list/index/@envCata.CataID">@envCata.CataName</a>
                     if (cataCount < envCataList.Count - 1)
                     {
                         cataCount++;
                         @: | 
                     }
                 }
             }
             </span>
           @* <span class="fr"><a href="#">更多>></a></span>不够位置放更多按钮，先注释着 *@
            <div class="cls">
            </div>
        </div>
        <div class="con_Main" id="envcata">
            @{
                List<WI_News> envList = ViewBag.EnvHealthList as List<WI_News>;
                foreach (var env in envList)
                {
                    string imgPath = string.IsNullOrWhiteSpace(env.NewsCover) ? "/Resource/images/test3.png" : env.NewsCover;
                <div class="con_m_show">
                    <div class="fl">
                        <img src="@imgPath" alt="" onerror="this.src='/Resource/images/test3.png';" /></div>
                @{
                    string htmlDescr = Server.HtmlDecode(env.Description);
                    string plainDescr = HtmlWorkshop.StripHtml(htmlDescr ?? string.Empty);
                }
                    <div class="con_m_info fr gray2">@Html.Raw(HtmlWorkshop.CutTitle(plainDescr ?? string.Empty, 45))<a class="linkColor" href="/detail/index/@env.NewsID" title="@env.NewsTitle" target="_blank">[详细]</a>
                    </div>
                    <div class="cls"></div>
                </div>
                }
            }
        </div>
    </div>
    <div class="contentBox">
        <div class="con_bar">
            <span class="fl tit"><a href="/list/index/@ViewBag.LawID">政策法规</a></span>
               <span class="subitem">
                   <input type="hidden" value="lawcata" name="refreshdiv" />
               @{
                    List<WI_NewsCata> lawCataList = ViewBag.LawCataList as List<WI_NewsCata>;
                    cataCount = 0;
                    foreach (var lawCata in lawCataList)
                    {
                        <a href="/list/index/@lawCata.CataID">@lawCata.CataName</a>
                        if (cataCount < lawCataList.Count - 1)
                        {
                            cataCount++;
                            @: | 
                        }
                    }
                }
               </span>
           @* <span class="fr"><a href="#">更多>></a></span>*@
            <div class="cls">
            </div>
        </div>
        <div class="con_Main" id="lawcata">
            <ul>
            @{
                List<WI_News> lawList = ViewBag.LawList as List<WI_News>;
                foreach (var law in lawList)
                {
                    string mark = law.Important == 2 ? "red" : "";
                    <li>· <a href="/detail/index/@law.NewsID" target="_blank" title="@law.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(law.NewsTitle ?? string.Empty, 16)</a></li>  
                }
            }
            </ul>
        </div>
    </div>
</div>
<div class="main_m">
    <div class="contentBox">
        <div class="tab">
            <ul>
                <li class="current">垃圾分类</li>
            </ul>
              <span class="subitem">
              <input type="hidden" value="rubcata" name="refreshdiv" />
              @{
                    List<WI_NewsCata> rubCataList = ViewBag.RubCataList as List<WI_NewsCata>;
                    cataCount = 0;
                    foreach (var rubCata in rubCataList)
                    {
                        <a href="/list/index/@rubCata.CataID">@rubCata.CataName</a>
                        if (cataCount < rubCataList.Count - 1)
                        {
                            cataCount++;
                            @: | 
                        }
                    }
               }
              </span>
            <span><a href="/list/index/@ViewBag.RubbishSortID">更多&gt;&gt;</a></span>
        </div>
        <div class="tab-content">
            <div class="imp_area">
                @{
                    List<WI_News> rubsortList = ViewBag.RubSortList as List<WI_News>;
                    WI_News rubsort1 = rubsortList.FirstOrDefault();
                    if (rubsort1 != null)
                    {
                        <h1 class="imp_txt"><a href="/detail/index/@rubsort1.NewsID" title="@rubsort1.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(rubsort1.NewsTitle, 22)</a></h1>
                        rubsort1 = rubsortList.Skip(1).FirstOrDefault();
                        <h3 class="imp_subtxt">
                        @if (rubsort1 != null)
                        {
                            <a href="/detail/index/@rubsort1.NewsID" title="@rubsort1.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(rubsort1.NewsTitle, 19)</a>
                            rubsort1 = rubsortList.Skip(2).FirstOrDefault();
                            if (rubsort1 != null)
                            {
                                @: | <a href="/detail/index/@rubsort1.NewsID" title="@rubsort1.NewsTitle" target="_blank">@HtmlWorkshop.CutTitle(rubsort1.NewsTitle, 19)</a>
                            }
                        }
                        </h3>
                    }
                }
            </div>
            <div class="imp_main">
            @{string defimg4 = "/Resource/images/test4.png";}
                <div class="imp_m_t">
                @{
                    //前面7条是较新的信息，后面5条是较旧的信息
                    var query = rubsortList.Skip(3).Take(7);
                    WI_News tempNews1 = query.FirstOrDefault();
                    string tempImgPath1 = tempNews1 == null ? defimg4 : string.IsNullOrWhiteSpace(tempNews1.NewsCover) ? defimg4 : tempNews1.NewsCover;                         
                }
                    <a href="@(tempNews1 == null ? "#" : "/detail/index/" + tempNews1.NewsID)" target="_blank"><img src="@tempImgPath1" alt="" /></a>
                    <div class="imp_m_info" id="rubcata">
                        <ul>
                        @{
                            foreach (var rubb in query)
                            {
                                string mark = rubb.Important == 2 ? "red" : "";
                                <li>· <a href="/detail/index/@rubb.NewsID" target="_blank" title="@rubb.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(rubb.NewsTitle ?? string.Empty, 22)</a></li>  
                            }
                        }
                        </ul>
                    </div>
                    <div class="cls">
                    </div>
                </div>
                <div class="imp_m_b">
                    <ul>
                    @{
                        var query1 = rubsortList.Skip(10).Take(5);
                        foreach (var rubb in query1)
                        {
                            <li><span class="fl">· <a href="/detail/index/@rubb.NewsID" target="_blank" title="rubb.NewsTitle">@HtmlWorkshop.CutTitle(rubb.NewsTitle ?? string.Empty, 22)</a></span>
                                <span class="gray fr">@((rubb.PubTime ?? rubb.CreateTime).ToString("yyyy-MM-dd"))</span> </li>
                        }
                    }
                    </ul>
                </div>
            </div>
            <div class="cls">
            </div>
        </div>
      
    </div>
    <div class="contentBox">
        <div class="tab">
            <ul>
                <li class="current">处理分类</li>
            </ul>
                <span class="subitem">
                <input type="hidden" value="procata" name="refreshdiv" />
                @{
                    List<WI_NewsCata> procCataList = ViewBag.ProcCataList as List<WI_NewsCata>;
                    cataCount = 0;
                    foreach (var procCata in procCataList)
                    {
                        <a href="/list/index/@procCata.CataID">@procCata.CataName</a>
                        if (cataCount < procCataList.Count - 1)
                        {
                            cataCount++;
                            @: | 
                        }
                    }
               }
               </span>
            <span><a href="/list/index/@ViewBag.ProcSortID">更多&gt;&gt;</a></span>
        </div>
        <div class="tab-content">
            <div class="imp_main">
                <div class="imp_m_t">
                @{
                    List<WI_News> procList = ViewBag.ProcSortList as List<WI_News>;
                    WI_News tempNews2 = procList.FirstOrDefault();
                    string tempImgPath2 = tempNews2 == null ? defimg4 : string.IsNullOrWhiteSpace(tempNews2.NewsCover) ? defimg4 : tempNews2.NewsCover;                         
                }
                    <a href="@(tempNews2 == null ? "#" : "/detail/index/" + tempNews2.NewsID)" target="_blank"><img src="@tempImgPath2" alt="" /></a>
                    <div class="imp_m_info" id="procata">
                        <ul>
                        @{
                            foreach (var proc in procList)
                            {
                                string mark = proc.Important == 2 ? "red" : "";
                                <li>· <a href="/detail/index/@proc.NewsID" target="_blank" title="@proc.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(proc.NewsTitle ?? string.Empty, 22)</a></li>
                            }
                        }
                        </ul>
                    </div>
                    <div class="cls">
                    </div>
                </div>
            </div>
            <div class="cls">
            </div>
        </div>
    </div>
</div>
<div class="main_r">
    <div class="contentBox">
        <div class="con_bar">
            <span class="fl tit">垃圾储运</span><span class="fr"><a href="/list/index/@ViewBag.RubbishStoreID">更多>></a></span>
            <div class="cls">
            </div>
        </div>
        <div class="con_Main">
            <img src="/Resource/images/test2.png" width="188px" height="92px" />
            <ul>
            @{
                List<WI_News> rubstoreList = ViewBag.RubStoreList as List<WI_News>;
                foreach (var rub in rubstoreList)
                {
                    string mark = rub.Important == 2 ? "red" : "";
                    <li>·<a href="/detail/index/@rub.NewsID" target="_blank" title="@rub.NewsTitle" class="@mark">@HtmlWorkshop.CutTitle(rub.NewsTitle ?? string.Empty, 12)</a> </li>  
                }
            }
            </ul>
        </div>
    </div>
    <div class="contentBox">
        <div class="con_bar">
            <span class="fl tit">标准规范</span><span class="fr"><a href="/list/index/@ViewBag.StandardID">更多>></a></span>
            <div class="cls">
            </div>
        </div>
        <div class="con_Main_2">
          <ul>
          @{
              List<WI_News> stdList = ViewBag.StdList as List<WI_News>;
              foreach (var std in stdList)
              {
                    <li><a href="/detail/index/@std.NewsID" target="_blank" title="@std.NewsTitle">@HtmlWorkshop.CutTitle(std.NewsTitle ?? string.Empty, 22)</a> </li>  
                }
            }
            </ul>
        </div>
    </div>

     <img src="/Resource/images/test2.png" width="190px" height="100px" />
</div>
<div class="cls"></div>
<div class="ad_area" align="center">
<img src="../../Resource/images/ad_test.png" width="950px" height="123px" />
</div>